//
//  YCGeoPoint.m
//  Pods
//
//  Created by Apple on 2023/4/23.
//

#import "YCGeoPoint.h"

@implementation YCGeoPoint

+ (instancetype)setupWithLat:(NSNumber *)lat lng:(NSNumber *)lng {
    YCGeoPoint *p = [[YCGeoPoint alloc] init];
    p.lat = lat;
    p.lng = lng;
    return p;
}

- (CLLocationCoordinate2D)locationCoordinate2D {
    return CLLocationCoordinate2DMake(self.lat.doubleValue, self.lng.doubleValue);
}

- (CLLocation *)getLocationAddress
{
    CLLocation *userLocation = [[CLLocation alloc] initWithLatitude:[self.lat doubleValue] longitude:[self.lng doubleValue]];
    return userLocation;
}

@end
